package org.mm.service.impl;

import org.mm.model.TherapyTask;
import org.mm.service.TherapyTaskService;
import org.mm.repository.TherapyTaskRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * TherapyTaskServiceImpl
 *
 * @author Marco Traversari
 * @version $Revision: $ $Date: $ $Author: $
 */
@Service("therapyTaskServiceImpl")
public class TherapyTaskServiceImpl implements TherapyTaskService {

	@Autowired
	private TherapyTaskRepository therapyTaskRepository;

	public TherapyTask findById(Long therapyTaskId) throws Exception {
		return therapyTaskRepository.findOne(therapyTaskId);
	}

	public TherapyTask save(TherapyTask therapyTask) throws Exception {
		return therapyTaskRepository.save(therapyTask);
	}
}
